<!--  -->
<template>
  <div id="topbar">  
    <el-button type="primary"  id="goback" @click="goBack()">返回</el-button>
    <!-- <el-link icon="el-icon-edit" href="https://element.eleme.io" target="_blank" id="goback" type="info">返回</el-link> -->
        <!-- <el-button type="info" plain >返回</el-button>  -->
        <div id="tou"  ><slot>考试</slot></div>
        <el-button type="primary" id="baocun" >保存</el-button>
        <el-button type="success" id="tijiao">提交</el-button>
    
  </div>
</template>

<script>
export default
{
  data () 
  {
    return {};
  },
  props:{currentName:{
    type:String,
    default:""
  }},
  components: {},

  computed: {},

  methods: {
    goBack() {
      if(this.currentName=="考试")
      this.$router.push(`/StudentLayout/StudentExperiment/考试/2`)
      else
      this.$router.push(`/StudentLayout/StudentExperiment/作业/0`)
      }
      
      
  }
}

</script>

<style  scoped>
#topbar{
    background-color: rgb(0,158,251);
   
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100% ;
    height: 50px;
 }
 #tou{
  
  color:rgb(255,255,255);
  display: inline;
  position: fixed;
  top:15px;
  left:45%;
  font-size: large;
 }
 #tijiao{
  position: absolute;
  top:0px;
  right: 0px;
  height: 50px;
  width:80px;
 }
 #baocun{
  position: absolute;
  top:0px;
  right: 80px;
  height: 50px;
  width:80px;
 }
 #goback{
  position: absolute;
  top:0px;
  left: 0px;
  height: 50px;
  width:80px;
  color:aliceblue
 }
</style>